import itertools
def printNext(b):
    for i in range(0,len(b)):
        yield b[i]
a= [1,2,3]
hoanvi =list(itertools.permutations(a))
c= printNext(hoanvi)
c.next()